//
//  PFPhoto.m
//  PrintFamily
//
//  Created by edaihua on 16/2/28.
//  Copyright © 2016年 ___PrintFactory___. All rights reserved.
//

#import "PFPhoto.h"
#import "PFPhotoRectManager.h"
#import <Foundation/Foundation.h>
#import <AssetsLibrary/AssetsLibrary.h>

@import Photos;
@interface PFPhoto ()

@property (nonatomic, strong) NSString           *localIdentifier; // Used for array search as key

@end

@implementation PFPhoto

- (instancetype)initWithPHAsset:(PHAsset*)asset printType:(PhotoPrintType)type boarder:(PhotoBoarder)boarder rectManager:(PFCommonRectManager*)rectManager {
    if (self = [super init]) {
        self.asset = asset;
        self.localIdentifier = asset.localIdentifier;
        self.rectManager = [[PFPhotoRectManager alloc] initWithType:type boarder:PhotoBoarder_White asset:asset commonManager:rectManager];
        self.printType = type;
        self.printNumber = 1;
        //self.zoomScale = 1.0;
    }
    return self;
}

- (NSUInteger)increasePrintNumber {
    return ++self.printNumber;
}

- (NSUInteger)decreasePrintNumber {
    return --self.printNumber;
}

@end
